﻿var viewModel = {
    List: ko.observableArray(),
    List2: ko.observableArray(),
    TiXi: ko.observableArray(),
    Radio: ko.observableArray(),
    CheckBox: ko.observableArray(),
};

$(function () {
	//绑定列表1
    var list = new Rein.KoRepeater({
        size: 5,
        selector: "#t1",//列表绑定区域
        pager: "#PageNation",//分页ID
        conditions: { },//参数
        queryUrl: "http://58.56.66.241:8801/tjzcfw/policy/list/",
        vessel: viewModel.List,
        
    });
    list.loadData();
    //ko.applyBindings(viewModel, document.getElementById("div1"));

    //绑定列表2
    var list2 = new Rein.KoRepeater({
        size: 5,
        selector: "#t2",//列表绑定区域
        pager: "#PageNation2",//分页ID
        conditions: {},//参数
        queryUrl: "http://58.56.66.241:8801/tjzcfw/policy/list/",
        vessel: viewModel.List2
    });
    list2.loadData();

    //绑定下拉菜单
    list.DictionariesList('http://192.168.2.126:8801/tjzcfw/policyInfo/getSystems', viewModel.TiXi);
	//绑定单选按钮
    list.DictionariesList('http://192.168.2.126:8801/tjzcfw/policyInfo/getSystems', viewModel.Radio);
	//绑定多选
    list.DictionariesList('http://192.168.2.126:8801/tjzcfw/policyInfo/getSystems', viewModel.CheckBox);
    ko.applyBindings(viewModel, document.getElementById("viewModelBox"));
});





